from app.exts import db
from app.models.po.base_po import BasePO

class GaoLuRulePO(db.Model, BasePO):
    __tablename__ = "gaolu_rule"
    __bind_key__ = "serve_engine"
    id = db.Column(db.Integer, primary_key=True)
    is_deleted = db.Column(db.Integer)
    desc = db.Column(db.VARCHAR(64), comment='描述')
    unit = db.Column(db.VARCHAR(64), comment='单位')
    lower = db.Column(db.Float())
    upper = db.Column(db.Float())
    type = db.Column(db.VARCHAR(64), comment='描述')
    weight = db.Column(db.Float(), comment='权重')
    score = db.Column(db.Integer())
    name = db.Column(db.VARCHAR(64), comment='名称')
    frequency = db.Column(db.VARCHAR(64), comment='频率')
    section = db.Column(db.TEXT,comment='区间')
    scope_name = db.Column(db.VARCHAR(64),comment="范围")
    scope = db.Column(db.VARCHAR(64),comment="范围")
    rule_group_id =  db.Column(db.Integer())

    def __repr__(self):
        return "GaoLuDiagnoseRulePO"